@extends('layouts.admin')
@section('content')
    <div class="card">
        <div class="card-body">
            <ul class="nav nav-tabs nav-overflow header-tabs">
                <li class="nav-item">
                    <a href="{{route('admin.catergory.index')}}" class="nav-link pb-3 ">
                        栏目列表
                    </a>
                </li>
                <li class="nav-item">
                    <a href="{{route('admin.catergory.create')}}" class="nav-link pb-3 active">
                        发表栏目
                    </a>
                </li>
            </ul>
        </div>
        <form action="{{route('admin.catergory.store')}}" method="post">
            @csrf
            <div class="card-body">
                <div class="card">
                    <div class="card-header">
                        基本设置
                    </div>
                    <div class="card-body">
                        <div class="form-group">
                            <label>栏目名称</label>
                            <input type="text" name="title" class="form-control" placeholder="" aria-describedby="helpId">
                        </div>
                        <div class="form-group">
                            <label>栏目图标</label>
                            <input type="text" name="icon"  class="form-control" placeholder="" aria-describedby="helpId">
                        </div>
                        <div class="form-group">
                            <label>父级栏目</label>
                            <select name="parent_id" class="form-control">
                                <option value="0">顶级栏目</option>
                                @foreach($categories as $category)
                                    <option value="{{$category['id']}}">{{$category['_title']}}</option>
                                @endforeach
                            </select>
                        </div>
                    </div>
                </div>
            </div>
            <div class="card-footer text-muted">
                <button class="btn btn-primary btn-sm">保存提交</button>
            </div>
        </form>
    </div>
    @endsection
